﻿/*
 <?xml version="1.0"?>
<mobypicture>
  <result code="0"></result>
  <results>
    <result> 
          <user> 
            <username>DagmarSporck</username> 
            <firstname>Dagmar</firstname> 
            <lastname>Sporck</lastname> 
            <url_avatar>http://www.mobypicture.com/images/avatar/5c6b7527ace6a9a43af1f170d5848d83_60px.jpg</url_avatar> 
            <url_avatar_small>http://www.mobypicture.com/images/avatar/5c6b7527ace6a9a43af1f170d5848d83_24px.jpg</url_avatar_small> 
          </user> 
          <post> 
            <id>6129381</id> 
            <title>Dutch windmills in Flevopolder</title> 
            <description></description> 
            <location_latlong>52.595429,5.57467</location_latlong> 
            <created_on>2010-03-09 14:35:27</created_on> 
            <created_on_epoch>1268141727</created_on_epoch> 
            <comments>0</comments> 
            <media> 
              <url_thumbnail>http://img.mobypicture.com/b2bec2c50ebee4a23b121a767eda20fc_thumbnail.jpg</url_thumbnail> 
              <url_square>http://img.mobypicture.com/b2bec2c50ebee4a23b121a767eda20fc_square.jpg</url_square> 
              <url_full>http://img.mobypicture.com/b2bec2c50ebee4a23b121a767eda20fc_full.jpg</url_full> 
              <type>photo</type> 
              <original_width>640</original_width> 
              <original_height>480</original_height> 
              <processing>0</processing> 
            </media> 
            <device> 
              <manufacturer></manufacturer> 
              <model></model> 
            </device> 
            <link>http://www.mobypicture.com/user/DagmarSporck/view/6129381</link> 
            <link_tiny>http://moby.to/ysorjx</link_tiny> 
          </post> 
        </result>
  </results>
</mobypicture>

 */
using System.Collections.Generic;
using System.Xml.Serialization;
using MobySharp.Results.Shared;

namespace MobySharp.Results
{
    [XmlRoot("mobypicture")]
    public class SearchResult : BaseResult, IResult
    {
        public SearchResult()
        {
            Results = new List<SesarchResult>();
            Result = new MobyResult();
        }

        [XmlElement(ElementName = "total_results")]
        public int TotalResults { get; set; }

        [XmlArray("results"), XmlArrayItem(ElementName = "result")]
        public List<SesarchResult> Results { get; set; }

        #region Nested type: SesarchResult

        public class SesarchResult
        {
            [XmlElement(ElementName = "user")]
            public MobyUser User { get; set; }

            [XmlElement(ElementName = "post")]
            public MobyPost Post { get; set; }
        }

        #endregion
    }
}